package com.example.supermarket.mapper;

import com.example.supermarket.pojo.Shop;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface ShopMapper {
    @Select("select * from shop")
    List<Shop> getAllShop();

    @Select("select * from shop where business_id=#{businessId}")
    List<Shop> getShopByBusinessId(Integer businessId);

    @Select("select item_id from shopitem where shop_id=#{shopId}")
    List<Integer> getItemByShopId(Integer shopId);

    @Select("select * from shop where shop_id=#{shopId}")
    Shop getByShopId(Integer shopId);
}
